import Vue from 'vue'
import Router from 'vue-router'
import home from '@/home'
import login from '@/views/login'
import more from '@/views/more'
import items from '@/views/items'
import $ from 'zepto'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/more',
      name: 'more',
      component: more
    },
    {
      path: '/items',
      name: 'items',
      component: items
    }
  ]
})
router.afterEach(function (router) {
  $.allowPanelOpen = true
  console.log(router)
})
export default router
